package org.framework.lazy.cloud.network.heartbeat.server.standalone.controller;

import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.netty.server.permeate.server.mapping.*;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.netty.server.permeate.server.mapping.LazyInternalNetworkServerPermeateServerMapping;
import org.wu.framework.web.spring.EasyController;
import org.springframework.web.bind.annotation.*;
import org.wu.framework.web.response.Result;
import jakarta.annotation.Resource;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.LazyInternalNetworkServerPermeateServerMappingApplication;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.dto.LazyInternalNetworkServerPermeateMappingDTO;
import java.util.List;
import org.wu.framework.lazy.orm.database.lambda.domain.LazyPage;
/**
 * describe 服务端网络渗透映射 
 *
 * @author Jia wei Wu
 * @date 2024/09/17 01:35 下午
 * @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyController 
 **/
@Tag(name = "服务端网络渗透映射提供者")
@EasyController("/lazy/internal/network/server/permeate/mapping")
public class LazyInternalNetworkServerPermeateServerMappingProvider {

    @Resource
    private LazyInternalNetworkServerPermeateServerMappingApplication lazyInternalNetworkServerPermeateServerMappingApplication;

    /**
     * describe 新增服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateServerMappingStoryCommand 新增服务端网络渗透映射
     * @return {@link Result< LazyInternalNetworkServerPermeateServerMapping >} 服务端网络渗透映射新增后领域对象
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "新增服务端网络渗透映射")
    @PostMapping("/story")
    public Result<LazyInternalNetworkServerPermeateServerMapping> story(@RequestBody LazyInternalNetworkServerPermeateServerMappingStoryCommand lazyInternalNetworkServerPermeateServerMappingStoryCommand){
        return lazyInternalNetworkServerPermeateServerMappingApplication.story(lazyInternalNetworkServerPermeateServerMappingStoryCommand);
    }
    /**
     * describe 批量新增服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateServerMappingStoryCommandList 批量新增服务端网络渗透映射
     * @return {@link Result<List< LazyInternalNetworkServerPermeateServerMapping >>} 服务端网络渗透映射新增后领域对象集合
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "批量新增服务端网络渗透映射")
    @PostMapping("/batchStory")
    public Result<List<LazyInternalNetworkServerPermeateServerMapping>> batchStory(@RequestBody List<LazyInternalNetworkServerPermeateServerMappingStoryCommand> lazyInternalNetworkServerPermeateServerMappingStoryCommandList){
        return lazyInternalNetworkServerPermeateServerMappingApplication.batchStory(lazyInternalNetworkServerPermeateServerMappingStoryCommandList);
    }
    /**
     * describe 更新服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateServerMappingUpdateCommand 更新服务端网络渗透映射
     * @return {@link Result< LazyInternalNetworkServerPermeateServerMapping >} 服务端网络渗透映射领域对象
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "更新服务端网络渗透映射")
    @PutMapping("/updateOne")
    public Result<LazyInternalNetworkServerPermeateServerMapping> updateOne(@RequestBody LazyInternalNetworkServerPermeateServerMappingUpdateCommand lazyInternalNetworkServerPermeateServerMappingUpdateCommand){
        return lazyInternalNetworkServerPermeateServerMappingApplication.updateOne(lazyInternalNetworkServerPermeateServerMappingUpdateCommand);
    }
    /**
     * describe 查询单个服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateServerMappingQueryOneCommand 查询单个服务端网络渗透映射
     * @return {@link Result<LazyInternalNetworkServerPermeateMappingDTO>} 服务端网络渗透映射DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "查询单个服务端网络渗透映射")
    @GetMapping("/findOne")
    public Result<LazyInternalNetworkServerPermeateMappingDTO> findOne(@ModelAttribute LazyInternalNetworkServerPermeateServerMappingQueryOneCommand lazyInternalNetworkServerPermeateServerMappingQueryOneCommand){
        return lazyInternalNetworkServerPermeateServerMappingApplication.findOne(lazyInternalNetworkServerPermeateServerMappingQueryOneCommand);
    }
    /**
     * describe 查询多个服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateServerMappingQueryListCommand 查询多个服务端网络渗透映射
     * @return {@link Result<List<LazyInternalNetworkServerPermeateMappingDTO>>} 服务端网络渗透映射DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "查询多个服务端网络渗透映射")
    @GetMapping("/findList")
    public Result<List<LazyInternalNetworkServerPermeateMappingDTO>> findList(@ModelAttribute LazyInternalNetworkServerPermeateServerMappingQueryListCommand lazyInternalNetworkServerPermeateServerMappingQueryListCommand){
        return lazyInternalNetworkServerPermeateServerMappingApplication.findList(lazyInternalNetworkServerPermeateServerMappingQueryListCommand);
    }
    /**
     * describe 分页查询多个服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateServerMappingQueryListCommand 分页查询多个服务端网络渗透映射
     * @return {@link Result<LazyPage<LazyInternalNetworkServerPermeateMappingDTO>>} 分页服务端网络渗透映射DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "分页查询多个服务端网络渗透映射")
    @GetMapping("/findPage")
    public Result<LazyPage<LazyInternalNetworkServerPermeateMappingDTO>> findPage(@Parameter(description ="分页大小") @RequestParam(defaultValue = "10", value = "size") int size,
                           @Parameter(description ="当前页数") @RequestParam(defaultValue = "1", value = "current") int current,@ModelAttribute LazyInternalNetworkServerPermeateServerMappingQueryListCommand lazyInternalNetworkServerPermeateServerMappingQueryListCommand){
        return lazyInternalNetworkServerPermeateServerMappingApplication.findPage(size,current, lazyInternalNetworkServerPermeateServerMappingQueryListCommand);
    }
    /**
     * describe 删除服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateServerMappingRemoveCommand 删除服务端网络渗透映射
     * @return {@link Result< LazyInternalNetworkServerPermeateServerMapping >} 服务端网络渗透映射
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "删除服务端网络渗透映射")
    @DeleteMapping("/remove")
    public Result<LazyInternalNetworkServerPermeateServerMapping> remove(@ModelAttribute LazyInternalNetworkServerPermeateServerMappingRemoveCommand lazyInternalNetworkServerPermeateServerMappingRemoveCommand){
        return lazyInternalNetworkServerPermeateServerMappingApplication.remove(lazyInternalNetworkServerPermeateServerMappingRemoveCommand);
    }
}